using MediatR;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace B.S.NewMedical.Api.Write.Application.Command.ContentManagement.Carousel
{
    /// <summary>
    /// 批量删除轮播图命令
    /// </summary>
    public class DeleteCarouselCommand : IRequest<BatchDeleteResult>
    {
        /// <summary>
        /// 轮播图ID列表
        /// </summary>
        [Required(ErrorMessage = "轮播图ID列表不能为空")]
        [MinLength(1, ErrorMessage = "至少需要提供一个轮播图ID")]
        public List<int> Ids { get; set; } = new List<int>();

        /// <summary>
        /// 操作人
        /// </summary>
        public string? UpdatePeople { get; set; }
    }

    /// <summary>
    /// 批量删除结果
    /// </summary>
    public class BatchDeleteResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 成功删除的数量
        /// </summary>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败的数量
        /// </summary>
        public int FailCount { get; set; }

        /// <summary>
        /// 失败的ID列表
        /// </summary>
        public List<int> FailedIds { get; set; } = new List<int>();

        /// <summary>
        /// 错误消息
        /// </summary>
        public string? Message { get; set; }
    }
}